$(function () {
    //初始化专业
    $.initSubject({
        element:'point-subject-box',//初始化专业select元素的ID
        context:'point-subject-context',//显示专业/科目名字内容ID
        initData:$('#subjectIds').val(),//初始化显示的专业数据，默认不设置
        removeCallback:function(parentId,subjectIds){//删除回调
            resetSubjectIds()
        },
        confirmCallback:function(parentId,subjectIds){//点击确认回调
            resetSubjectIds()
        }
    });
    /**
     * 重置专业ID串
     */
    function resetSubjectIds() {
        var _subjectIds = $.getAllSubjectIds("point-subject-context");
        $("input[name=subjectIds]").val(_subjectIds);
    }
    $("body").on('click','#selectLoreSetPoint',function () {//选择考点
        var subject = $('input[name=subjectIds]').val();
        selectLoresetPoint(subject, 'checkbox', setLoresetPointData);
    }).on('click', '#table-loreset-point i.fa-trash', function () { // 删除知识点
        $(this).parents('tr').remove();
        toggleLoresetPointNoDataTips();
    });
});